import { rcaNumberFormat } from './common.js'
import { commonTableOption } from './common.js'
export const tableOption = {
  ...commonTableOption,
  column: [
    {
      hide: true,
      type: 'input',
      label: '唯一标识',
      prop: 'id'
    }, {
      type: 'date',
      label: '交易日期（yyyy-MM-dd）',
      prop: 'tradeDate'
    }, {
      type: 'select',
      label: '线路',
      prop: 'lineCode',
      search: true,
      cascaderItem: ['stationCode'],
      props: {
        label: 'name',
        value: 'code'
      },
      dicUrl: '/support/swparamline/dictAll',
    }, {
      type: 'select',
      label: '车站',
      prop: 'stationCode',
      search: true,
      props: {
        label: 'name',
        value: 'code'
      },
      dicFlag: false,
      dicUrl: `/support/swparamstation/dict/{{key}}`,
    }, {
      type: 'input',
      showSummary: true,
      label: '支付宝实收笔数',
      prop: 'alipayAmount'
    }, {
      type: 'input',
      showSummary: true,
      precision: 2,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat(value, true)
      },
      label: '支付宝实收金额',
      prop: 'alipayMoney'
    }, {
      type: 'input',
      showSummary: true,
      label: '微信实收笔数',
      prop: 'wechatAmount'
    }, {
      type: 'input',
      showSummary: true,
      precision: 2,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat(value, true)
      },
      label: '微信实收金额',
      prop: 'wechatMoney'
    }]
}
